﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoPartsSearch.Domain.Abstract;
using AutoPartsSearch.Domain.Entities;
using AutoPartsSearch.Domain.Entities.Messages;
using AutoPartsSearch.Domain.Common;

namespace AutoPartsSearch.Domain.Concrete.Mappers
{
    public class SearchQueryToMessageMapper : IMapper<SearchQuery, Message>
    {
        private readonly IConfigurationGetter _configurationGetter;

        public SearchQueryToMessageMapper(IConfigurationGetter configurationGetter)
        {
            this._configurationGetter = configurationGetter;
        }

        public Message Map(SearchQuery input)
        {
            var subject = _configurationGetter.GetConfigurationValue(Constants.SearchQueryMessageSubject);
            var body = string.Format("Новый запрос на запчасть ");
            return new Message
                       {
                           Body = input.Name
                       };
        }
    }
}
